package com.cms.common.model.services.impl;


import com.cms.common.model.entity.UploadFile;
import com.cms.common.model.repository.UploadFileRepository;
import com.cms.common.model.services.UploadFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service("UploadFileService")
public class UploadFileServiceImpl implements UploadFileService {

    @Autowired
    UploadFileRepository uploadFileRepository;


    @Override
    public UploadFile findByMd5(String md5) {
        return uploadFileRepository.findByMd5(md5);
    }

    @Override
    public UploadFile save(UploadFile uploadFile) {
        return uploadFileRepository.saveAndFlush(uploadFile);
    }
}
